//
//  GuestCardTableViewCell.m
//  penzer
//
//  Created by 还带大道 on 2018/11/7.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "GuestCardTableViewCell.h"

@interface GuestCardTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *arrow;
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UIImageView *bgV1;
@property (weak, nonatomic) IBOutlet UIImageView *bgV2;
@property (weak, nonatomic) IBOutlet UIImageView *bgV3;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *date;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bgV1_bottomMargin;
@property (weak, nonatomic) IBOutlet UIButton *detailBtn;
@property (weak, nonatomic) IBOutlet UIButton *qrcodeBtn;

@end

@implementation GuestCardTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.arrow.image = [[UIImage imageNamed:@"icon_arrow"] imageWithTintColor:[UIColor whiteColor]];
//    self.contentView.backgroundColor = [UIColor orangeColor];
    self.detailBtn.userInteractionEnabled = NO;
}


- (void)setShowCardCount:(NSInteger)showCardCount
{
    _showCardCount = showCardCount;
    switch (showCardCount) {
        case 1:
            self.bgV1_bottomMargin.constant = 10;
            self.bgV2.hidden = YES;
            self.bgV3.hidden = YES;
            break;
        case 2:
            self.bgV1_bottomMargin.constant = 10;
            self.bgV2.hidden = NO;
            self.bgV3.hidden = YES;
            break;
        case 3:
            self.bgV1_bottomMargin.constant = 20;
            self.bgV2.hidden = NO;
            self.bgV3.hidden = NO;
            break;
    }
}


- (IBAction)onClick_QRcord {
    RZLog(@"onClick_QRcord");
    !self.onClickQRcodeBlock?:self.onClickQRcodeBlock();
}


- (IBAction)onClick_detail {
    RZLog(@"onClick_detail");
}

@end
